part of 'bloc.dart';

class UserProgressBlockBlocState {
  const UserProgressBlockBlocState({
    required this.pointCount,
    required this.nextLevelRemainingPointCount,
    required this.levelIndex,
    required this.nextLevelProgressRatio,
  });

  final int pointCount;
  final int? nextLevelRemainingPointCount;
  final int levelIndex;
  final double nextLevelProgressRatio;

  UserProgressBlockBlocState copyWith({
    int Function()? pointCount,
    int? Function()? nextLevelRemainingPointCount,
    int Function()? levelIndex,
    double Function()? nextLevelProgressRatio,
  }) {
    return UserProgressBlockBlocState(
      pointCount: pointCount == null ? this.pointCount : pointCount(),
      nextLevelRemainingPointCount: nextLevelRemainingPointCount == null
          ? this.nextLevelRemainingPointCount
          : nextLevelRemainingPointCount(),
      levelIndex: levelIndex == null ? this.levelIndex : levelIndex(),
      nextLevelProgressRatio:
          nextLevelProgressRatio == null ? this.nextLevelProgressRatio : nextLevelProgressRatio(),
    );
  }
}
